Crate odds [−] [src]
Odds and ends — collection miscellania.
- Utilities for debug-checked, release-unchecked indexing and slicing
- Fixpoint combinator for closures
- String and Vec extensions
The odds crate has the following crate feature flags:
std
- Default
- Requires Rust 1.6 to opt out of
- Use libstd and std features.
unstable
.- Optional.
- Requires nightly channel.
- Implement the closure traits for Fix.
Modules
char |
Extra functions for |
prelude |
prelude of often used traits and functions |
slice |
Extra functions for slices |
stride |
Slice iterator with custom step size |
string |
Extensions to |
vec |
Extensions to |
Structs
Fix |
Fixpoint combinator for rust closures, generalized over the return type. |
Traits
IndexRange |
IndexRange is implemented by Rust's built-in range types, produced
by range syntax like |
Functions
debug_assert_unreachable⚠ |
Act as |
fix |
Fixpoint combinator for rust closures, generalized over the return type. |
get_unchecked⚠ |
Use |
get_unchecked_mut⚠ |
Use |
ptr_eq |
Compare if a and b are equal pointers. |
raw_byte_repr⚠ |
Safe to use with any wholly initialized memory |
ref_eq |
Compare if a and b are equal as pointers. |
ref_slice |
Create a length 1 slice out of a reference |
ref_slice_mut |
Create a length 1 mutable slice out of a reference |
slice_unchecked⚠ |
Check slicing bounds in debug mode, otherwise just act as an unchecked slice call. |
slice_unchecked_mut⚠ |
Check slicing bounds in debug mode, otherwise just act as an unchecked slice call. |